package com.xiaotou.domain;

public enum SkillLevel {
	Beginner(0), Expert(10);

	private int value;

	SkillLevel(int value) {
		this.value = value;
	}

	public int getValue() {
		return this.value;
	}

	public SkillLevel valueOf(int value) {
		for (SkillLevel skillLevel : values()) {
			if (skillLevel.getValue() == value) {
				return skillLevel;
			}
		}
		throw new RuntimeException("error skill level value: " + value);
	}
}
